﻿@{
    ViewBag.Title = "Index";
}

<div class="path one columns">商品创意</div>

<div class="slider"></div>

<div class="commentform">
    @using (Html.BeginForm("DoSearch", "Commodity", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
        @Html.ValidationSummary(true)
        <input id="_key" name="_key" type="text" />
        <input class="button" id="Search_click" name="Search_click" type="submit" value="Search" />
        <br />
          
    }
</div>


<div class="slider"></div>
    
<!-- START WORKS -->
<div class="works">
   @{ int i = 0;}
   @foreach (var item in (IEnumerable<KnowledgeCommunity.Model.Commodity>)ViewData["CommodityList"])
   {
       i++;
       if (i % 4 != 0)
       {
          <div class="columns four">
            <div class="work"> <a href="@Url.Action("Details", "Commodity", new { id=item.Id})" rel="prettyPhoto[a]" class="pretty" title="@item.Title"> <span></span><img src="@Url.Content(item.Logo)" alt="cards" /></a>
                <h3><a href="@Url.Action("Details", "Commodity", new { id=item.Id})">@item.Title</a></h3>
                <h4>价格：@item.CurrentPrice ￥ ,数量：@item.Count </h4>
            </div>
          </div>
       }
       else 
       {
          <div class="columns four_last">
            <div class="work"> <a href="@Url.Action("Details", "Commodity", new { id=item.Id})" rel="prettyPhoto[a]" class="pretty" title="@item.Title"> <span></span><img src="@Url.Content(item.Logo)" alt="cards" /></a>
                <h3><a href="@Url.Action("Details", "Commodity", new { id=item.Id})">@item.Title</a></h3>
                <h4>价格：@item.CurrentPrice ￥ ,数量：@item.Count </h4>
            </div>
          </div>
       }
          
   }
    <div class="clear"></div>
</div>
